package org.zp.util;

import java.util.regex.Pattern;

public class ValiAdmindate {
private String error;
	
	
	public boolean checkUserName(String userName) {
		if(null == userName) {
			error = "用户名不能为空";
			return false;
		}
		
		userName = userName.trim();
		
		if("".equals(userName)) {
			error = "用户名不能为空";
			return false;
		}
		
		if(userName.length()<=1) {
			error = "用户名不能小于1位";
			return false;
		}
		
		
		return true;

	}
	
	public boolean checkContent(String content) {
		if(null == content) {
			error = "内容不能为空";
			return false;
		}
		
		content = content.trim();
		
		if("".equals(content)) {
			error = "内容不能为空";
			return false;
		}
		
		if(content.length()<=1) {
			error = "内容不能小于1位";
			return false;
		}
		
		
		return true;

	}
	
	
	
	
	
	public String getError() {
		return error;
	}


	public void setError(String error) {
		this.error = error;
	}
}
